package com.itheima_5;


import java.io.*;
import java.net.Socket;

public class ClientTest {
    public static void main(String[] args) throws IOException {
        Socket socket=new Socket("127.0.0.1",10001);
        BufferedReader is = new BufferedReader(new FileReader("C:\\Users\\86152\\Desktop\\题目(不含答案)\\test.txt"));
        OutputStream os = socket.getOutputStream();
        byte bytes[]=new byte[1024];
        int b;
        while ((b=is.read())!=-1){
            os.write(bytes,0,bytes.length);
        }
        socket.shutdownOutput();
    }
}
